var loadingDiv = document.createElement('div');
var innerDiv = document.createElement('div');
var spinner = document.createElement('img');
var loadingText = document.createTextNode('Caricamento');
var height=document.body.clientHeight;
var width=document.body.clientWidth;

spinner.setAttribute('src','imgs/spinner.gif');
spinner.setAttribute('style','margin-right:5px;');
if(height)
	innerDiv.setAttribute('style','position:absolute;top:'+(40+height/2)+'px;left:'+(40+width/2)+'px');

innerDiv.appendChild(spinner);
innerDiv.appendChild(loadingText);
loadingDiv.appendChild(innerDiv);
loadingDiv.setAttribute('id','loadingDiv');
loadingDiv.setAttribute('style','font-family:sans-serif;font-size:medium;text-align:center;position:absolute;background-color:white;left:0px;top:0px;' +
		'background-image:url("imgs/logoWebBased.it.png");background-repeat:no-repeat;' +
		'background-attachment:fixed;background-position:center center;width:100%;height:100%;');
document.body.appendChild(loadingDiv);